﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using DevComponents.DotNetBar;

namespace PriErp.Frm
{
    public partial class UserDlg : UserControl
    {
        public UserDlg()
        {
            InitializeComponent();
        }
        /// 信息变更事件
        /// </summary>
        [Description("信息变更事件")]
        public event MethodInvoker OnSubmit; 
        /// <summary>
        /// 变更事件
        /// </summary>
        public void SubmitChange()
        {
            if (OnSubmit != null)
                OnSubmit();
        }

        /// 退出事件
        /// </summary>
        [Description("信息变更事件")]
        public event MethodInvoker OnCancel;
        /// <summary>
        /// 退出事件
        /// </summary>
        public void CancelChange()
        {
            if (OnCancel != null)
                OnCancel();
        }

        private void SaveInfo()
        {
            //建议对比数据然后执行操作
            SubmitChange();
        }

        private void btnSubmit_Click(object sender, EventArgs e)
        {
            SaveInfo();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            CancelChange();
        }
    }
}
